<template>
  <div class="person">
    <h2>我是Person组件</h2>
    <h3>姓名：{{name}}</h3>
    <h3>年龄：{{age}}</h3>
    <button @click="show">看看你的灵魂</button>
  </div>
</template>

<script>
  export default {
    name:'Person',
    /* data() {
      return {
        name:'李四'
      }
    }, */
    props:['name','age'],
    methods: {
      show(){
        console.log(this)
      }
    },
  }
</script>

<style scoped>
  .person {
    background-color: skyblue;
    padding: 20px;
  }
</style>